#if !defined(__HTTP_REQUEST_H__)
#define __HTTP_REQUEST_H__

#include "stdint.h"
#include "stdbool.h"

typedef uint8_t (*http_stream_cb_t)(void *user_data, uint8_t *data, uint32_t size);
typedef uint8_t (*http_header_cb_t)(void *user_data, char *key, char *value);
int8_t http_request(const char *method, char *url, char *server, char *port, char *path, const char *data, uint32_t data_len, http_stream_cb_t cb, void *user_cb, http_header_cb_t header_cb);
int8_t http_get(char *server, char *url, char *port, char *path, const char *data, uint32_t data_len, http_stream_cb_t cb, void *user_cb, http_header_cb_t header_cb);
int8_t http_post(char *server, char *url, char *port, char *path, const char *data, uint32_t data_len, http_stream_cb_t cb, void *user_cb, http_header_cb_t header_cb);
void http_get_url_info(char *url, char *server, char *port, char *path);
int8_t http_request_from_url(const char *method, char *url, const char *data, uint32_t data_len, http_stream_cb_t cb, void *user_cb, http_header_cb_t header_cb);

#endif // __HTTP_REQUEST_H__
